﻿<Page
    x:Class="WPClient.View.HomePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:WPClient"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:view="using:WPClient.View"
    mc:Ignorable="d"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}">
    <Page.Background>
        <ImageBrush Stretch="UniformToFill" ImageSource="ms-appx:///Assets/home-background.png"/>
    </Page.Background>
    <Page.Transitions>
        <TransitionCollection>
            <NavigationThemeTransition>
                <NavigationThemeTransition.DefaultNavigationTransitionInfo>
                    <CommonNavigationTransitionInfo IsStaggeringEnabled="True"/>
                </NavigationThemeTransition.DefaultNavigationTransitionInfo>
            </NavigationThemeTransition>
        </TransitionCollection>
    </Page.Transitions>

    <Grid>
        <Pivot x:Uid="Pivot" Title="INFORMIAMOCI PARTECIPANDO" x:Name="pivot" CommonNavigationTransitionInfo.IsStaggerElement="True">
            <PivotItem
                Margin="19,14.5,0,0"
                Header="Istituzioni"
                CommonNavigationTransitionInfo.IsStaggerElement="True">
                <StackPanel>
                    <Image Source="ms-appx:///Assets/camera-logo.png" />
                    <Image Source="ms-appx:///Assets/senato-logo.png" />
                </StackPanel>
            </PivotItem>
            <PivotItem
                Margin="19,14.5,0,0"
                Header="Forze politiche"
                CommonNavigationTransitionInfo.IsStaggerElement="True">
                <ListView
                    ItemsSource="{Binding Groups, Source={StaticResource SampleDataSource}}"
                    IsItemClickEnabled="True"
                    ContinuumNavigationTransitionInfo.ExitElementContainer="True">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0,0,0,9.5">
                                <view:InfoElementControl />
                            </StackPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </PivotItem>
        </Pivot>
    </Grid>

    <Page.BottomAppBar>
        <CommandBar>
            <AppBarButton Label="accedi" Icon="Contact" Click="AppBarButton_Click" />
            <AppBarButton Label="fonti" Icon="AllApps" />
        </CommandBar>
    </Page.BottomAppBar>
</Page>
